An online application server may be generally referred to as an online application platform on which various applications developed by a third party may be deployed. A client may remotely connect to the online application platform to experience these applications. A general interaction process between the online application platform and the client is as follows: The client uploads an input event generated by a user operation to the server; after receiving the event, the server performs computation and handling, and sends a picture response result after the handling to the client; and after receiving the picture, the client displays it locally. In this online application scenario, the running and handling of all applications are carried out on the server, and the client is only responsible for uploading a user's operation input to the server, receiving the picture, and decoding and displaying the picture. However, from the perspective of a user side, the user feels as if the user is operating local applications.
An existing remote desktop system supports automatic reconnection after an exception occurs. A remote desktop MSTSC (Microsoft Terminal Services Client) provided by the Microsoft Windows operating system is used as an example. Automatic reconnection means that when a network exception occurs, the client may reconnect to a same session to which the client is previously connected, without re-sending verification information. After the client establishes a connection with the server successfully, the server sends an automatic reconnection cookie to the client. The cookie is bound to a current session and stored on the client. When a connection exception occurs, the client encrypts the cookie and sends the encrypted cookie to the server. The server verifies the cookie. If the verification is successful, it indicates that the currently connected client and the previously disconnected client are the same client, and therefore the server recovers the previously session, so that the client resumes the previous session to continue operations on the remote desktop.
It is found through analysis that the prior art has at least the following disadvantages: For an online application system, because a virtual machine may be allocated to multiple users for use simultaneously, when disconnection occurs due to an exception, if the virtual machine allows applications to continue running and waits for the user to connect, without releasing resources or performing any storage with respect to the running of the applications, resources of the virtual machine are occupied, and the capacity and efficiency of the online application system are also reduced, and furthermore, when the client reconnects, the client may fail to continue the operations performed at the occurrence of the exception.